<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class CAgent_model extends CI_Model {

    function __construct()
    {
        parent::__construct();
    }
    
    function insert($name, $phone)
    {
        $this->db->insert('contragents', array( 
                                                'id'    => 0,
                                                'name'  => $name,
                                                'phone' => $phone,)
        );
    }
    
    function aList()
    {
        return $this->db->get('contragents')->result();
    }

}
?>
